package com.lening.iot;

import com.lening.common.config.LoadBalancerConfiguration;
import com.lening.iot.aliyun.util.AmqpClient;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClients;

import javax.annotation.Resource;

@SpringBootApplication
@EnableDiscoveryClient
@LoadBalancerClients(defaultConfiguration = LoadBalancerConfiguration.class)
public class IotApplication {

    @Resource
private AmqpClient amqpClient;
    public static void main(String[] args) {
        SpringApplication.run(IotApplication.class, args);
        try {
            AmqpClient.test();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

}
